# !/usr/bin/env python
# -*- coding:utf-8 -*-
# @Time      :2022/8/2 0002 0:44
# @Author    :jiaxuesong

'''
二次封装unittest，定义父类，
'''
import unittest, time
from appium_test.common.driver import Driver

class MyTest(unittest.TestCase):
    #定义driver初始化值
    driver = None
    #创建初始化方法
    @classmethod
    def setUpClass(cls) -> None:
        cls.driver = Driver().startUp()

    def setUp(self) -> None:
        self.driver.launch_app()
        time.sleep(10)

    #创建清理方法
    def tearDown(self) -> None:
        self.driver.close_app()

    @classmethod
    def tearDownClass(cls) -> None:
        cls.driver.quit()


if __name__ == '__main__':
    unittest.main()
    unittest.MyTest()






